package com.mes.cloud.dao;

import com.mes.cloud.entity.SysOrganization;
import com.mes.cloud.entity.SysOrganizationArea;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.ids.SelectByIdsMapper;

import java.util.List;
import java.util.Map;

/**
 * 组织行政区中间表
 *
 * @author xy
 * @version 2019-08-01 10:47:27
 * @email yuan.xue3@pactera.com
 */
public interface SysOrganizationAreaDao extends SelectByIdsMapper<SysOrganizationArea>, Mapper<SysOrganizationArea> {

    /**
     * <批量插入>
     *
     * @param sysOrganizationAreas
     * @return int
     * @author xy
     * @date 2019/8/1 11:22
     */
    int batchInsert(List<SysOrganizationArea> sysOrganizationAreas);

    /**
     * <通过组织id更新>
     *
     * @param sysOrganizationArea
     * @return int
     * @author xy
     * @date 2019/8/1 17:01
     */
    int updateByOrganizationId(SysOrganizationArea sysOrganizationArea);

    /**
     * 查询组织行政区划
     *
     * @param params
     * @return List<SysOrganization>
     */
    List<SysOrganization> selectOrgByArea(Map<String, Object> params);
}
